import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/home',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue'),
    },
    {
      path: '/',
      name: 'Login',
      component: () => import('../views/User/LoginView.vue'),
    },
    {
      path: '/AddKS',
      name: 'AddKS',
      component: () => import('../views/DPM/AddKSView.vue'),
    },
    {
      path: '/ShowKS',
      name: 'ShowKS',
      component: () => import('../views/DPM/ShowKSView.vue'),
    },
    {
      path: '/UptKS',
      name: 'UptKS',
      component: () => import('../views/DPM/UptKsView.vue'),
    },
    {
      path: '/AddYS',
      name: 'AddYS',
      component: () => import('../views/Doctor/AddYSView.vue'),
    },
    {
      path: '/ShowYS',
      name: 'ShowYS',
      component: () => import('../views/Doctor/ShowYSView.vue'),
    },
    {
      path: '/ShowBF',
      name: 'ShowBF',
      component: () => import('../views/Room/ShowBFView.vue'),
    },
    {
      path: '/AddBF',
      name: 'AddBF',
      component: () => import('../views/Room/AddBFView.vue'),
    },
    {
      path: '/Jump',
      name: 'Jump',
      component: () => import('../views/User/JumpView.vue'),
    },
  ],
})

export default router
